package com.ebuy.factory;

import java.sql.Connection;
import java.sql.DriverManager;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

/**
 * 
 * @author Kevin
 */
class DBConnectionFactoryImpl extends DBConnectionFactory {

	public Connection getConnection() {
		try {
			Class.forName(driver);
			Connection conn = DriverManager.getConnection(URL, username,
					password);

			return conn;
		} catch (SQLException ex) {
			Logger.getLogger(DBConnectionFactoryImpl.class.getName()).log(
					Level.SEVERE, null, ex);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
}